package com.group525.cloudef.controller.user;


import com.group525.cloudef.common.CommonResult;
import com.group525.cloudef.entity.user.UImage;
import com.group525.cloudef.service.doctor.DUserService;
import com.group525.cloudef.service.user.UImageService;
import com.group525.cloudef.utils.Log;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author group525
 * @since 2023-05-24
 */
@RestController
@CrossOrigin
//@RequestMapping("/image/getImage")
@Api(tags = "影像信息")
public class UImageController {
    @Resource
    UImageService ImageService;

    @Resource
    Log log;

    @RequestMapping("/image/getImage")
    @ApiOperation(value = "医生获取患者影像")
    public List<UImage> getImage(@RequestBody Long user_id){
        return ImageService.getImage(user_id);
    }

    @RequestMapping("/admin/image/getAllImages")
    @ApiOperation(value = "管理获取全部影像")
    public List<UImage> getAllImages(){
        return ImageService.list();
    }

    @RequestMapping("/admin/image/CountImageType")
    public CommonResult<?>CountImageType(){
        return ImageService.CountImageType();

    }


}

